class ServiceException(Exception):
    def __init__(self, code, msg = ''):
        Exception.__init__(self)
        self.code = code
        self.msg = msg